feat: NLDAS-3 icechunk example#577
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a ControlPanel (intro-only, no controls) describing the example, matching the other examples' info box. Re-adds Chakra deps for Text. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Set maxBounds to lon [-169, -52], lat [7, 72] so the map can't pan or zoom out beyond where data exists. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kylebarron
commented
May 27, 2026
The grid constants are baked into metadata.ts; the spike was scaffolding. Removes scripts/smoke.ts, its README section, the tsx devDep, and the scripts tsconfig include. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kylebarron
commented
May 27, 2026
kylebarron
commented
May 27, 2026
kylebarron
commented
May 27, 2026
kylebarron
commented
May 27, 2026
kylebarron
commented
May 27, 2026
Comment on lines
+59
to
+61
| * NLDAS-3 latitude is ASCENDING (row 0 = south, lat 7.005°), so the row step | ||
| * `e` is positive and the origin is the bottom-left cell corner = first cell | ||
| * center − half a pixel. Grid: 0.01° over lon [-169, -52], lat [7, 72]. |
Member
Author
There was a problem hiding this comment.
Interesting... Does this imply that #321 is now fixed? Or is this separate?
- Drop the CPU nodata-replacement loop: the source uses a finite -9999 sentinel (no NaN), already discarded on the GPU by FilterNoDataVal. - Remove redundant mipLevels: 1 (luma's default is already 1). - Rename Tair -> descriptive surface-temperature naming in identifiers and docstrings; keep the literal "/Tair" store path (the array's real name). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds runtime controls to the intro panel (reusing the shared Field, NativeSelect, ColormapPreview, and RangeSlider), matching the other examples. A new colormap-choices list drives the picker; rescale min/max become state with updateTriggers so cached tiles re-render on change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Slider still operates in Kelvin (the shader's unit); only the label converts, e.g. "10°C (283 K) – 40°C (313 K)". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The store's lat/lon coords are float32; deriving the affine by subtracting them injected precision noise (dLon ~0.00999451), drifting the east edge to -52.064 (~7 km). Use the exact intended grid: origin (-169, 7), step 0.01°. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
NLDAS-3 is a v1 icechunk repo. Without an explicit formatVersion, Repository.open auto-detects by fetching the v2 "/repo" marker, which 404s (then falls back to v1). Passing formatVersion: "v1" skips that probe. Verified: /repo requests drop 1 -> 0 per open (2 -> 0 with StrictMode's dev double-mount) while the array still opens. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
kylebarron
commented
May 27, 2026
…lue attr Instead of hard-coding NODATA_VALUE = -9999, openSurfaceTemp now reads (and validates) the array's `missing_value` attribute and returns it alongside the array. The render pipeline gets the fill sentinel from the store rather than a constant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cool to see fetches going into NetCDF files:

Summary
Adds
examples/nldas-icechunk— a minimal example proving theicechunk-js → zarrita → ZarrLayerpath works in the browser (closes #569).icechunk-js@0.4, authorizing theone virtual chunk container (
s3://nasa-waterinsight/NLDAS3/forcing/daily/)via
ReadSession.open(…, { virtualChunkContainers })so virtual chunks resolveto public HTTPS objects.
Tair(air temperature) timestep with the GPU colormappipeline (
CreateTexture → FilterNoDataVal → LinearRescale → Colormap). Thestore isn't GeoZarr-compliant, so synthetic spatial attrs are hard-coded (same
approach as the ECMWF example).
scripts/smoke.tsis the spike used to prove virtual-chunk reads and derive thegrid (origin/pixel-size/shape, units, fill); kept for reproducibility.
Notable: NLDAS-3 latitude is ascending (row 0 = south), so the affine has a
positive row-step
e. Verified that deck.gl-raster's affine tiling renders thiscorrectly (not flipped).
Test Plan
pnpm typecheck— cleanpnpm build— cleanwith the thermal colormap; ocean fill (
-9999) discarded to the basemap.cd examples/nldas-icechunk && pnpm dev)Written by Claude on behalf of @kylebarron
🤖 Generated with Claude Code